package com.bitmain.mmst.core.struct;
/**
 * 
 *
 * @author Richard - rui.wu@bitmain.com
 * @since 2016年8月10日 
 *
 */
public class ServiceResult<T> {
	private int code;
	
	private Boolean success;
	
	private T data;

	public int getCode() {
		return code;
	}

	public void setInfo(int code){
		setCode(code, Boolean.TRUE);
	}
	
	public void setError(int code) {
		setCode(code, Boolean.FALSE);
	}

	public void setCode(int code, Boolean success){
		this.code = code;
		this.success = success;
	}
	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}
}
